﻿#pragma once

#include "SourceCode/Renderer/Buffer.h"

namespace Hazal
{
	class COpenGLVertexBuffer : public CVertexBuffer
	{
	public:
		COpenGLVertexBuffer(float* pVertices, uint32_t size);

		COpenGLVertexBuffer(uint32_t unSize);

		virtual ~COpenGLVertexBuffer();

	public:
		void Bind() const override;

		void Unbind() const override;

		void SetLayout(const CBufferLayout& rLayout) override;

		const CBufferLayout& GetLayout() const override;

		void SetData(const void* pData, uint32_t unDataSize) override;


	private:
		uint32_t m_unRendererID;
		CBufferLayout m_layout;
	};

	class COpenGLIndexBuffer : public CIndexBuffer
	{
	public:
		COpenGLIndexBuffer(uint32_t* pIndices, uint32_t count);

		virtual ~COpenGLIndexBuffer();

	public:
		void Bind() const override;

		void Unbind() const override;

		uint32_t GetCount() const override;

	private:
		uint32_t m_unCount;
		uint32_t m_unRendererID;
	};
}
